# -*- coding: utf-8 -*-
import xlrd

filepath = "./B-2廖铸_现有目录.xls"
data = xlrd.open_workbook(filepath)
names = data.sheet_names()

for name in names:
    table = data.sheet_by_name(name)
    data.sheet_loaded(name)
    max_rows = table.nrows

    sheet_data = []
    """取数据"""
    j = 0
    temp = []
    for i in range(max_rows):
        j += 1
        if j > 4:
            if '\u4e00' <= table.row_values(i)[0] <= '\u9fa5':
                if len(temp) != 0:
                    sheet_data.append(temp)
                    temp = []
            elif "（" in table.row_values(i)[0]:
                if len(temp) != 0:
                    sheet_data.append(temp)
                    temp = []
            else:
                temp.append(table.row_values(i))
                # print(table.row_values(i))

    sheet_data.append(temp)

    print(sheet_data)
    # print(table.row_values(104)[0])